package com.heima.article.controller.v1;

import com.heima.article.service.ApCollectionsBehaviorService;
import com.heima.model.article.dto.CollectionBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Api("收藏行为")
@RestController
@RequestMapping("/api/v1/collection_behavior")
public class ApCollectionsBehaviorController {

    @Autowired
    ApCollectionsBehaviorService apCollectionsBehaviorService;

    @ApiOperation("收藏")
    @PostMapping
    public ResponseResult collect(@RequestBody CollectionBehaviorDto dto) {

        return apCollectionsBehaviorService.collect(dto);
    }

}
